package com.cmse.service;

import java.util.List;

import com.cmse.persistence.domain.User;
import com.cmse.persistence.enmu.RoleType;

/**
 * @author wulibin, exceptsky@gmail.com, 2012-3-15 下午12:54:02
 * 
 */
public interface IUserService extends IBaseService<User>{
	public boolean login(String name, String pw);
	
	public boolean register(User user);
	
	public User getByName(String name);
	
	public String getSecurityQuestion(long uid);
	
	public String getSecurityAnswer(long uid);
	
	public long getCountByRole(RoleType role);
	
	public List<User> getUsersByRole(RoleType role, int page);
	
	public List<User> searchByName(String name, int page);
	
	public long countOfSearch(String name);
	
	public User updatePassword(User user, String oldPw, String newPw);
}
